package com.example.cloudcashierpos.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.jetbrains.annotations.NotNull;

import kotlin.jvm.Transient;

@Entity
public class User {
    @Id(autoincrement = true)
    private Long id; // 主键（必须为 Long 类型）

    @Property(nameInDb = "user_name")
    private String name;

    @NotNull
    private String email;

    @Transient // 标记不存入数据库的字段
    private transient String tempData;

    public User(String name, @NotNull String email) {
        this.name = name;
        this.email = email;
    }


    public User() {
    }


    @Generated(hash = 696519933)
    public User(Long id, String name, @NotNull String email) {
        this.id = id;
        this.name = name;
        this.email = email;
    }


    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    // 生成 Getter/Setter（建议使用 IDE 自动生成）
}
